package com.neusoft.classch76;

public class LiteratureStudent extends Student {

	//新增属性
	//专业
		static final String MAJOR = "Literature";
	//演讲成绩
	private double speechScore;
	//作品成绩
	private double writingScore;
	
	
	//行为方法
	//重写方法
	@Override
	public double calculateOverall() {
		double overall = getScoreOfMidTerm()*0.15+getScoreOfFinal()*0.15+speechScore*0.35+writingScore*0.35;
		setOverall(overall);
		return overall;
	}
	
	
	
	@Override
	public void printOverall() {
		System.out.println("学号："+getStuNo()+" 姓名："+getStuName()
				+" 性别："+getStuGender()+" 年龄："+getStuAge()
				+"期中成绩"+getScoreOfMidTerm()+"期末成绩"+getScoreOfFinal()
				+"演讲成绩"+speechScore+"写作成绩"+writingScore
				+" 综合成绩："+this.calculateOverall());
	}



	//构造方法
	public LiteratureStudent() {
		super();
		// TODO Auto-generated constructor stub
	}
	
	public LiteratureStudent(String stuName, String stuNo, String stuGender, int stuAge, double scoreOfMidTerm,
			double scoreOfFinal,double speechScore,double writingScore) {
		super(stuName, stuNo, stuGender, stuAge, scoreOfMidTerm, scoreOfFinal);
		this.speechScore=speechScore;
		this.writingScore = writingScore;
	}
	//get&set方法
	public double getSpeechScore() {
		return speechScore;
	}
	
	public void setSpeechScore(double speechScore) {
		this.speechScore = speechScore;
	}
	public double getWritingScore() {
		return writingScore;
	}
	public void setWritingScore(double writingScore) {
		this.writingScore = writingScore;
	}
}
